package com.lj.back.manage.scaffold.module.sys;

import cn.hutool.core.util.RandomUtil;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @author lv
 * @version 1.0.0
 */
public class Util {

    private Util(){}

    public static String getRandomLengthString(){
        return getRandomLengthString(4,20);
    }

    public static String getRandomLengthString(int origin, int bound){
        return RandomUtil.randomString(ThreadLocalRandom.current().nextInt(origin,bound));
    }

    public static String getRandomEmail(){
        return getRandomLengthString()+"@"+getRandomLengthString()+".com";
    }

    public static String getRandomPhone(){
        return "13"+ ThreadLocalRandom.current()
                .nextLong(100000000,999999999);
    }
}
